<template>
    <div class="app-detail">
        <list-layout>
         <div slot="search">
            <el-form :model="queryParams" :inline="true" ref="queryForm" v-show="showSearch" label-width="128px">
                <el-form-item :label="$t('mrbForm.materialName')">
                    <el-input v-model="queryParams.materialName" :placeholder="$t('public.placeholder',{placeholder: $t('mrbForm.materialName')})" clearable size="small" @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item :label="$t('mrbForm.materialNo')">
                    <el-input v-model="queryParams.materialCode" :placeholder="$t('public.placeholder',{placeholder: $t('mrbForm.materialNo')})" clearable size="small" @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item :label="$t('mrbForm.supplierName')">
                    <el-input v-model="queryParams.supplierName" :placeholder="$t('public.placeholder',{placeholder: $t('mrbForm.supplierName')})" clearable size="small" @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item :label="$t('inventoryManagement.materialDocument')">
                    <el-input v-model="queryParams.lichn" :placeholder="$t('public.placeholder',{placeholder: $t('inventoryManagement.materialDocument')})" clearable size="small" @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item :label="$t('trialinvestment.secondtrial')">
                    <el-select v-model="queryParams.twiceTrial"  clearable  size="small"  >
                        <el-option label="是"  value="1"> </el-option>
                        <el-option label="否"  value="0"> </el-option>
                    </el-select>
                </el-form-item>

            </el-form>
            <div style="display: flex; justify-content: center">
                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t("public.search") }}</el-button>
                <el-button icon="el-icon-refresh" class="resectBtn" size="mini" @click="resetQuery">{{ $t("public.reset") }}</el-button>
            </div>
        </div>

        <div class="app-container">

            <!-- <el-row :gutter="10" class="mb8 btnGroup">
                <el-col :span="1.5">
                    <el-button size="mini" type="primary" :disabled="ids.length!=1"
                    icon="el-icon-s-check"  @click="typeOpen=true">  {{ "一次试投审批" }}</el-button>
                </el-col>
                <el-col :span="1.5">
                    <el-button size="mini" type="primary" :disabled="ids.length!=1"
                     icon="el-icon-s-check" @click="typeOpen2=true">  {{ "二次试投审批" }}</el-button>
                </el-col>
            </el-row>  -->
            <div class="container-table">
                <el-table class="table-fixed"   ref="multipleTable" :key="incomingKey" v-loading="loading" :height="tableHeight" border
                :data="incomingList"  @selection-change="handleSelectionChange" >
                    <!-- <el-table-column type="selection" width="55" fixed="left" align="center" :show-overflow-tooltip="true" /> -->
                    <el-table-column :label="$t('outlier.order')" sortable  align="left" prop="inspectionOrder" min-width="120" :show-overflow-tooltip="true" />
                    <el-table-column :label="$t('material.materialCode')" sortable  align="left" prop="materialCode" min-width="120" :show-overflow-tooltip="true" />
                    <el-table-column :label="$t('mrbForm.materialName')" sortable  align="left" prop="materialName" min-width="120" :show-overflow-tooltip="true" />
                    <el-table-column :label="$t('mrbForm.supplierName')" sortable  align="left" prop="supplierName" min-width="120" :show-overflow-tooltip="true" />
                    <el-table-column :label="$t('mrbForm.supplierBatchNo')" sortable  align="left" prop="lichn" min-width="120" :show-overflow-tooltip="true" />
                    <el-table-column label="COA" sortable  align="left" prop="inspectionCoa" min-width="100" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <span v-if="scope.row.onceTrialResult==1">NG</span>
                            <span v-else-if="scope.row.onceTrialResult==0">OK</span>
                            <span v-else>{{scope.row.onceTrialResult}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('inventoryManagement.inspector')" sortable  align="left" prop="tionInspectorName" min-width="150" :show-overflow-tooltip="true" />
                    <el-table-column :label="$t('inventoryManagement.inspectionStartTime')" sortable  align="left" prop="inspectionStartTime" min-width="150" :show-overflow-tooltip="true" >
                        <template slot-scope="scope">
                            <div class="action-wrap">
                                 {{ scope.row.inspectionStartTime | timefilter }}
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('inventoryManagement.inspectionEndTime')" sortable  align="left" prop="inspectionEndTime" min-width="150" :show-overflow-tooltip="true" >
                        <template slot-scope="scope">
                            <div class="action-wrap">
                                {{ scope.row.inspectionEndTime | timefilter }}
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('trialinvestment.oneResults')" sortable  align="left" prop="tightenTactics" min-width="120" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div class="action-wrap">
                                <span v-if="scope.row.onceTrialResult==1" style="color:green">{{$t('inventoryManagement.pass')}}</span>
                                <span v-if="scope.row.onceTrialResult==0" style="color:red">{{$t('inventoryManagement.fail')}}</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('trialinvestment.secondtrial')" sortable  align="left" prop="tightenTactics" min-width="120" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div class="action-wrap">
                                <span v-if="scope.row.twiceTrial==1">是</span>
                                <span v-if="scope.row.twiceTrial==0">否</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column :label="$t('trialinvestment.Secondresults')" sortable  align="left" prop="tightenTactics" min-width="120" :show-overflow-tooltip="true">
                        <template slot-scope="scope">
                            <div class="action-wrap">
                                <span v-if="scope.row.twiceTrialResult==1" style="color:green">{{$t('inventoryManagement.pass')}}</span>
                                <span v-if="scope.row.twiceTrialResult==0" style="color:red">{{$t('inventoryManagement.fail')}}</span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column  :label="$t('public.opera')" fixed="right" align="center" width="140">
                        <template slot-scope="scope">
                            <div class="action-wrap">
                                <table-body-btn type="gwedit"  :name="$t('trialinvestment.OneApproval')" v-if="!scope.row.onceTrialResult"
                                @click.native="handleAdd(scope.row)"  v-hasPermi="['ny-iqc:trialinvestment:onceApprove']"/>
                                <!--  允许二次试投 && 还未进行二次试投 &&  一次试投不通过 && 二次试投文件未上传-->
                                <table-body-btn type="add"   :name="$t('trialinvestment.secondrun')"
                                v-if="scope.row.twiceTrial==1 && !scope.row.twiceTrialResult && scope.row.onceTrialResult==0 && !scope.row.twiceTrialDoc"
                                 @click.native="handleAdd2(scope.row,'add')" v-hasPermi="['ny-iqc:trialinvestment:twiceTrial']"/>

                                <table-body-btn type="edit" :name="$t('trialinvestment.SecondaryApprova')"
                                v-if="scope.row.twiceTrial==1 && !scope.row.twiceTrialResult && scope.row.onceTrialResult==0 && scope.row.twiceTrialDoc"
                                 @click.native="handleAdd2(scope.row,'edit')" v-hasPermi="['ny-iqc:trialinvestment:twiceApprove']"/>

                                <table-body-btn type="gwview" :name="$t('public.detail')"  @click.native="onInfo(scope.row)"
                                v-hasPermi="['ny-iqc:trialinvestment:getInfo']"/>

                            </div>
                        </template>
                    </el-table-column>
                </el-table>

                <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" layout="total, sizes, prev, pager, next, jumper" />
            </div>

        </div>
        </list-layout>


        <!-- 一次试投审批 -->
        <el-dialog :title="$t('trialinvestment.OneApproval')" :visible.sync="typeOpen" center top="11vh"  width="1000px" :fullscreen="fullscreen" @close="close">
            <el-form :model="typeModel" size="small" label-suffix=":" ref="typeModel" :rules="rules" label-width="108px">
                <el-row :gutter="24" class="dia">

                    <el-col :span="24">
                        <el-form-item :label="$t('trialinvestment.oneResults')" prop="onceTrialResult">
                            <el-radio-group v-model="typeModel.onceTrialResult" class="smallRadio" >
                                <el-radio :label="'0'"> {{$t('inventoryManagement.fail')}} </el-radio>
                                <el-radio :label="'1'"> {{$t('inventoryManagement.pass')}} </el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item :label="$t('trialinvestment.oneResultsfile')" prop="onceTrialDoc" style="width:100%">
                            <file-upload :limit="1" bizType="onceTrialDoc" :otherList="onceTrialDocFile" :bizId="typeModel.inspectionId"
                             disabled   v-model="typeModel.onceTrialDoc" @change="(fileList)=>picChange(fileList,'onceTrialDoc')"></file-upload>
                        </el-form-item>
                    </el-col>

                    <el-col :span="24">
                        <el-form-item :label="$t('rule.remark')" prop="auditRemark">
                            <el-input size="small" type="textarea" :autosize="{ minRows: 5, maxRows: 6 }"
                            v-model="typeModel.onceRemark" maxlength="1000">
                            </el-input>
                        </el-form-item>
                    </el-col>

                </el-row>

            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitAdd" icon="el-icon-document" size="small">{{$t('public.save')}}</el-button>
            </div>
        </el-dialog>
        <!-- 二次试投审批 -->
        <el-dialog :title="$t('trialinvestment.SecondaryApprova')" :visible.sync="typeOpen2" center top="11vh"  width="1000px" :fullscreen="fullscreen" @close="close">
            <el-form :model="typeModel" size="small" label-suffix=":" ref="typeModel" :rules="rules" label-width="108px">
                <el-row :gutter="24" class="dia">

                    <el-col :span="24" v-if="twotype=='edit'">
                        <el-form-item :label="$t('trialinvestment.Secondresults')" prop="twiceTrialResult" >
                            <el-radio-group v-model="typeModel.twiceTrialResult" class="smallRadio">
                                <el-radio :label="'0'"> {{$t('inventoryManagement.fail')}} </el-radio>
                                <el-radio :label="'1'">{{$t('inventoryManagement.pass')}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>

                    <el-col :span="24">
                        <el-form-item :label="$t('trialinvestment.secondResultsfile')" prop="twiceTrialDoc" style="width:100%">
                            <file-upload :limit="1" bizType="twiceTrialDoc" :otherList="twiceTrialDocFile" :bizId="typeModel.inspectionId"
                            v-model="typeModel.twiceTrialDoc" @change="(fileList)=>picChange(fileList,'twiceTrialDoc')" :disabled="twotype=='edit'"></file-upload>

                        </el-form-item>
                    </el-col>
                    <el-col :span="24" v-if="twotype=='edit'">
                        <el-form-item :label="$t('rule.remark')" prop="remark">
                            <el-input size="small" type="textarea" :autosize="{ minRows: 5, maxRows: 6 }" v-model="typeModel.twiceRemark"
                             maxlength="1000"  >
                            </el-input>
                        </el-form-item>
                    </el-col>

                </el-row>

            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitAdd" icon="el-icon-document" size="small">{{$t('public.save')}}</el-button>
            </div>
        </el-dialog>
        <!-- 查看 -->
        <el-dialog :title="$t('public.detail')" :visible.sync="typeOpen3" center top="11vh"  width="1000px" :fullscreen="fullscreen" @close="close">
            <el-form :model="typeModel" size="small" label-suffix=":" ref="typeModel"   label-width="108px">
                <el-row :gutter="24" class="dia">
                    <el-col :span="24">
                        <el-divider content-position="center">{{ $t('trialinvestment.Onceary')}}  </el-divider>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item :label="$t('trialinvestment.oneResults')" prop="onceTrialResult">
                            <el-radio-group v-model="typeModel.onceTrialResult" class="smallRadio" disabled>
                                <el-radio :label="'0'"> {{$t('inventoryManagement.fail')}} </el-radio>
                                <el-radio :label="'1'"> {{$t('inventoryManagement.pass')}} </el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item :label="$t('trialinvestment.oneResultsfile')" prop="onceTrialDoc" style="width:100%">
                            <file-upload :limit="1" bizType="onceTrialDoc" :otherList="onceTrialDocFile" :bizId="typeModel.id" disabled
                            v-model="typeModel.onceTrialDoc" @change="(fileList)=>picChange(fileList,'onceTrialDoc')"></file-upload>
                        </el-form-item>
                    </el-col>

                    <el-col :span="24">
                        <el-form-item :label="$t('rule.remark')" prop="auditRemark">
                            <el-input size="small" type="textarea" :autosize="{ minRows: 5, maxRows: 6 }" disabled
                            v-model="typeModel.onceRemark" maxlength="1000">
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24" v-if="typeModel.onceTrialResult==0">
                        <el-form-item  :label="$t('trialinvestment.secondtrial')" prop="twiceTrial" >
                            <el-radio-group v-model="typeModel.twiceTrial" class="smallRadio" disabled>
                                <el-radio :label="'0'"> 否 </el-radio>
                                <el-radio :label="'1'"> 是 </el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24" v-if="typeModel.twiceTrial==1 && typeModel.twiceTrialResult">
                        <el-divider content-position="center">
                            {{ $t('trialinvestment.Secondary')}}
                            <el-tooltip class="item" effect="dark" :content="$t('trialinvestment.Secondary')" placement="right">
                                    <i class="el-icon-question" style="font-size:16px;cursor:pointer"></i>
                            </el-tooltip>
                        </el-divider>
                    </el-col>

                    <el-col :span="24" v-if="typeModel.twiceTrial==1 && typeModel.twiceTrialResult">
                        <el-form-item :label="$t('trialinvestment.Secondresults')" prop="twiceTrialResult" >
                            <el-radio-group v-model="typeModel.twiceTrialResult" class="smallRadio" disabled>
                                <el-radio :label="'0'"> {{$t('inventoryManagement.fail')}} </el-radio>
                                <el-radio :label="'1'"> {{$t('inventoryManagement.pass')}} </el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>

                    <el-col :span="24" v-if="typeModel.twiceTrial==1 && typeModel.twiceTrialResult">
                        <el-form-item :label="$t('trialinvestment.secondResultsfile')" prop="twiceTrialDoc" style="width:100%">
                            <file-upload :limit="1" bizType="twiceTrialDoc" :otherList="twiceTrialDocFile" :bizId="typeModel.id" disabled
                            v-model="typeModel.twiceTrialDoc" @change="(fileList)=>picChange(fileList,'twiceTrialDoc')"></file-upload>

                        </el-form-item>
                    </el-col>
                    <el-col :span="24" v-if="typeModel.twiceTrial==1 && typeModel.twiceTrialResult">
                        <el-form-item :label="$t('rule.remark')" prop="remark">
                            <el-input size="small" type="textarea" :autosize="{ minRows: 5, maxRows: 6 }" v-model="typeModel.twiceRemark"
                             maxlength="1000" disabled>
                            </el-input>
                        </el-form-item>
                    </el-col>

                </el-row>

            </el-form>

        </el-dialog>

    </div>
</template>

<script>

import {mapGetters, mapState} from 'vuex'

import SelectUserDialog from '@/views/components/SelectUserDialog'
import { geFileByBiz } from '@/api/file/file'

import { investmentlistAPI,investmentapproveAPI,isInitiateAPI} from "@/api/inventoryManagement/investment"

export default {
    name: 'editMaterial',
    dicts: [
       'NYIQC_CYCLE_TYPE',
       'NYIQC_RULE_TACTICS'
    ],
    components: {

        SelectUserDialog,
    },
    data() {

        return {
            showSearch: true,
            tableHeight: 'calc(100vh - 308px)',

            typeOpen: false,
            queryParams:{
                pageNum:1,
                pageSize:20
            },

            typeModel: {
                twiceTrial:'0'
            },
            twiceTrial:"1",
            onceTrialDocFile:[],
            twiceTrialDocFile:[],
            // 遮罩层
            loading: true,
            // 选中数组
            ids: [],
            // 非单个禁用
            single: true,
            // 非多个禁用
            multiple: true,
            // 显示搜索条件
            showSearch: true,
            stemList: [],
            // 总条数
            total: 0,
            // 字典表格数据
            incomingList: [],
            // 弹出层标题
            title: '',
            // 是否显示弹出层
            open: false,
            // 日期范围
            dateRange: [],
            selectRows: [],
            rowifInspect: '',
            // 查询参数

            // 表单参数
            form: {},
            // 表单校验
            rules: {
                onceTrialResult: [ {
                        required: true,
                        message: '请选择试投结果',

                }],
                onceTrialDoc: [ {
                        required: true,
                        message: '一次试投审批文件不能为空',
                }],
                onceTrialMaterials: [ {
                        required: true,
                        message: '一次试投材料不能为空',

                }],
                twiceTrial: [ {
                        required: true,
                        message: '是否二次试投',
                }],
                twiceTrialResult:[ {
                        required: true,
                        message: '请选择二次试投结果',

                }],
                twiceTrialMaterials: [ {
                        required: true,
                        message: '二次试投材料不能为空',
                }],
                twiceTrialDoc: [ {
                        required: true,
                        message: '二次试投审批文件不能为空'
                }],

            },
            fullscreen: false,
            incomingKey: 0,
            projectList:[],
            //抽样类型 1：正常，2：放宽，3：加严
            samplingTypeList:[
                {value:"1",label:"正常"},
                {value:"2",label:"放宽"},
                {value:"3",label:"加严"},
            ],
             //触发方式（1：自动触发，2：手动触发）
            triggerModeList:[
                {value:"1",label:"自动触发"},
                {value:"2",label:"手动触发"}
            ],

            ruleData: {},   // 规则详情
            fileList:[],
            ids:[],
            disabled:false,
            typeOpen2:false,
            typeOpen3:false,
            twotype:""
        }
    },

    mounted() {
        // this.getRuleInfo()
        this.getList()

    },
    activated() {
        // this.getRuleInfo()
        this.getList()
    },
    filters:{
        timefilter(time){
            if(!time){
                return ""
            }
            var date = new Date(time);
            var Y = date.getFullYear() + '-';
            var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
            var D = date.getDate() + ' ';
            var h = (date.getHours() < 10 ?  '0'+date.getHours() : date.getHours() ) + ':';
            var m = (date.getMinutes() < 10 ?  '0'+date.getMinutes() : date.getMinutes()) + ':';
            var s = date.getSeconds() < 10 ?  '0'+date.getSeconds() : date.getSeconds() ;

            return Y+M+D+h+m+s
        }
    },
    computed: {
        ...mapGetters(['userId', 'name', 'deptName']),

    },

    methods: {
         // 多选框选中数据
         handleSelectionChange(selection) {
            console.log(selection)
            this.ids=selection
        },
        geFileByBizlist() {
            geFileByBiz({ bizId: this.typeModel.inspectionId }).then((res) => {
                let onceTrialDoc = []
                let onceTrialMaterials = []
                let twiceTrialDoc=[]
                let twiceTrialMaterials=[]
                res.data.forEach((io) => {
                    var index= io.originalFileName.lastIndexOf(".");
                    var ext = io.originalFileName.substr(index+1);
                    if (io.bizType === 'onceTrialDoc') {
                        onceTrialDoc.push(io)
                        this.typeModel.onceTrialDoc=ext
                    }
                    if (io.bizType === 'onceTrialMaterials') {
                        onceTrialMaterials.push(io)
                        this.typeModel.onceTrialMaterials=ext
                    }
                    if (io.bizType === 'twiceTrialDoc') {
                        twiceTrialDoc.push(io)
                        this.typeModel.twiceTrialDoc=ext
                    }
                    if (io.bizType === 'twiceTrialMaterials') {
                        twiceTrialMaterials.push(io)
                        this.typeModel.twiceTrialMaterials=ext
                    }
                })

                this.onceTrialDocFile = onceTrialDoc
                this.onceTrialMaterialsFile = onceTrialMaterials
                this.twiceTrialDocFile = twiceTrialDoc
                this.twiceTrialMaterialsFile = twiceTrialMaterials
            })
        },
        picChange(fileList,type) {
            console.log(fileList,999)
            var filePath=fileList[0].name
            var index= filePath.lastIndexOf(".");
            var ext = filePath.substr(index+1);
            if (type=='onceTrialDoc') {
                 this.typeModel.onceTrialDoc=ext
                 this.$refs.typeModel.clearValidate('onceTrialDoc')
                // this.onceTrialDocFile=fileList
            } else if(type=='onceTrialMaterials'){
                this.$refs.typeModel.clearValidate('onceTrialMaterials')
                  this.typeModel.onceTrialMaterials=ext
                // this.onceTrialMaterialsFile=fileList
            }else if(type=='twiceTrialDoc'){
                this.$refs.typeModel.clearValidate('twiceTrialDoc')
                  this.typeModel.twiceTrialDoc=ext
                // this.twiceTrialDocFile=fileList
            }else if(type=='twiceTrialMaterials'){
                this.$refs.typeModel.clearValidate('twiceTrialMaterials')
                  this.typeModel.twiceTrialMaterials=ext
                // this.twiceTrialMaterialsFile=fileList
            }
           this.$forceUpdate()
        },

        fileChange(e) {
            this.fileList = e
            console.log(e)
        },

        handleQuery(){
            this.queryParams.pageNum = 1
            this.getList()
        },
        // 查看
        onInfo(row) {
            this.disabled=true
            this.typeModel=JSON.parse(JSON.stringify(row))
            this.geFileByBizlist()

            this.typeOpen3 = true

        },
         /**  按钮操作 */
        handleAdd(row) {

            this.typeModel= {}
            this.typeModel=JSON.parse(JSON.stringify(row))
            this.geFileByBizlist()
            this.typeOpen = true

        },
        handleAdd2(row,type) {
            this.twotype=type

            this.typeModel= {}
            this.typeModel=JSON.parse(JSON.stringify(row))
            this.geFileByBizlist()
            this.typeOpen2 = true

        },
        close(){
            // this.typeModel= { }
            this.$refs.typeModel.resetFields();
        },
        // 删除
        onDelete(row) {
            this.$modal.confirm(this.$t('formValidation.doYouConfirmDeletion')).then(() => {
                skipDel(row.id).then((response) => {
                    if (response.code == 200) {
                        this.$modal.msgSuccess(this.$('tips.deleteSuccess'))
                        this.getList()
                    }
                })
            })
        },

        // 提交添加
        submitAdd(){
            console.log(this.typeModel,'typeModel')
            this.$refs.typeModel.validate((valid) => {
                if (valid) {
                    var data={
                        onceTrialResult:this.typeModel.onceTrialResult,
                        id:this.typeModel.id,
                        onceRemark:this.typeModel.onceRemark,
                        onceTrialDoc:this.typeModel.onceTrialDoc,

                    }
                    // 二次试投
                    // if(this.typeModel.twiceTrial==1){
                        data.twiceTrialResult=this.typeModel.twiceTrialResult
                        // data.twiceTrialMaterials=this.typeModel.twiceTrialMaterials
                        data.twiceTrialDoc=this.typeModel.twiceTrialDoc
                        data.twiceRemark=this.typeModel.twiceRemark
                    // }

                    investmentapproveAPI(data).then(res=>{
                        this.$message.success( '审批成功')
                        this.getList()
                        this.typeOpen=false
                        this.typeOpen2=false
                    })
                } else {
                    // this.$modal.msgError(this.$t('formValidation.theBasicInformationIsIncomplete'))

                }
            })
        },

        /**  类型列表 */
        getList() {
            this.loading = true
            var data={
                ...this.queryParams
            }
            investmentlistAPI(data).then((response) => {
                // if (response.code==200) {
                    this.incomingList = response.rows

                    this.total = response.total
                    this.loading = false

                // }
            })
        },
        // 取消按钮
        resetQuery() {

            this.queryParams={
                 pageNum:1,
                pageSize:20
            }
            this.getList()
        },

        /** 关闭操作 */
        handleClose(row) {
            this.$router.go(-1)
        },

    },
}
</script>
<style lang="scss" scoped>@import './index.scss';</style>
